Learn R Programming

MXM (version 0.9.4)

Backward selection with generalised linear regression models: Variable selection in generalised linear regression models with backward selection

Description

Variable selection in generalised linear regression models with backward selection

Usage

glm.bsreg(target, dataset, threshold = 0.05)

Arguments

target
The class variable. Provide either an integer, a numeric value, or a factor. See also Details.
dataset
The dataset; provide either a data frame or a matrix (columns = variables, rows = samples). In either case, only two cases are avaialble, either all data are continuous, or categorical.
threshold
Threshold (suitable values in [0,1]) for asmmmbsing p-values significance. Default value is 0.05.

Value

The output of the algorithm is S3 object including: The output of the algorithm is S3 object including:

Details

This functions currently implements only linear, binary logistic and Poisson regression. If the sample size is less than the number of variables a meesage will appear and no backward regression is performed.

See Also

fs.reg, lm.fsreg, bic.fsreg, bic.glm.fsreg, CondIndTests, MMPC, SES

Examples

Run this code
set.seed(123)
#require(gRbase) #for faster computations in the internal functions
require(hash)

#simulate a dataset with continuous data
dataset <- matrix( runif(1000 * 50, 1, 100), ncol = 50 )

#define a simulated class variable 
target <- rpois(1000, 10)

a <- glm.bsreg(target, dataset, threshold = 0.05) 

Run the code above in your browser using DataLab